package com.company.ref;

import org.omg.CORBA.PUBLIC_MEMBER;

import javax.lang.model.SourceVersion;
import javax.lang.model.element.VariableElement;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

/**
 * @ProjectName: 复习java
 * @Package: com.company.ref
 * @ClassName: test1
 * @Author: wym
 * @Date: 2020/10/19 20:43
 * @Version: 1.0
 */
public class test1 {
//    public static void main(String[] args) {
//        String name="消费";
//        method(name);
//        System.out.println(name);
//    }
//
//    public static void  method(String name){
//        name="小贝";
//    }
public static void main(String[] args) {
    Persion p= new Persion();
    method(p);
    System.out.println(p.name);

}

    public static void  method(Persion per){
        per.name="贝贝";
    }

}
class Persion{
    String name="飞飞";
}

